#include "AVLTree.h"

int main()
{

    //AVLTree<int, int> avlt;
    //avlt.insert(pair<int, int>(1, 10));//注意，匿名对象具有常性
    //avlt.insert(pair<int, int>(2, 20));
    //avlt.insert(pair<int, int>(3, 30));
    //avlt.insert(pair<int, int>(3, 999));
    //avlt.insert(pair<int, int>(4, 40));
    //avlt.insert(pair<int, int>(5, 50));
    ////avlt.print();

    srand(time(NULL));
    srand((unsigned int)time(NULL));

    AVLTree<int, string> avl;
    string s = "TestRand!!!";
    for (int i = 0; i < 100; i++)
    {
        avl.insert(pair<int, string>(rand()%1000+1, "T"));
    }
    avl.print();

<<<<<<< HEAD
    if(avl.IsBalance())
        cout << "YES!!!" << endl;
    else
        cout << "NO!!!" << endl;
=======
    ////右单旋
    //AVLTree<int, int> test;
    //test.insert(pair<int, int>(10, 0));
    //test.insert(pair<int, int>(5, 0));
    //test.insert(pair<int, int>(4, 0));
    ////test.insert(pair<int, int>(11, 0));
    ////test.insert(pair<int, int>(7, 0));
    ////test.insert(pair<int, int>(3, 0));
    //test.print();
>>>>>>> d61d371b286c007a322db41e830561ba43211bb8
    return 0;
}